﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace PropertySample
{
    public partial class AdventureWorksModel : DbContext
    {
        public AdventureWorksModel()
            : base("name=AdventureWorksModel")
        {
        }

        public virtual DbSet<应教221班> 应教221班 { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<应教221班>()
                .Property(e => e.班级)
                .IsFixedLength();

            modelBuilder.Entity<应教221班>()
                .Property(e => e.姓名)
                .IsFixedLength();

            modelBuilder.Entity<应教221班>()
                .Property(e => e.学号)
                .IsFixedLength();

            modelBuilder.Entity<应教221班>()
                .Property(e => e.电话)
                .IsFixedLength();
        }
    }
}
